package com.web.domain;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by sandideas on 2016/9/7.
 */
@Entity
@Table(name = "t_notice")
public class Notice {
    @Id
    private int noticeId;
    private String noticeTitle;
    private String noticeContent;
    private Timestamp noticeOverdueTime;
    private String noticeAddUser;
    private Timestamp noticeAddTime;
    private Integer showState;

    @Basic
    @Column(name = "noticeId")
    public int getNoticeId() {
        return noticeId;
    }

    public void setNoticeId(int noticeId) {
        this.noticeId = noticeId;
    }

    @Basic
    @Column(name = "noticeTitle")
    public String getNoticeTitle() {
        return noticeTitle;
    }

    public void setNoticeTitle(String noticeTitle) {
        this.noticeTitle = noticeTitle;
    }

    @Basic
    @Column(name = "noticeContent")
    public String getNoticeContent() {
        return noticeContent;
    }

    public void setNoticeContent(String noticeContent) {
        this.noticeContent = noticeContent;
    }

    @Basic
    @Column(name = "noticeOverdueTime")
    public Timestamp getNoticeOverdueTime() {
        return noticeOverdueTime;
    }

    public void setNoticeOverdueTime(Timestamp noticeOverdueTime) {
        this.noticeOverdueTime = noticeOverdueTime;
    }

    @Basic
    @Column(name = "noticeAddUser")
    public String getNoticeAddUser() {
        return noticeAddUser;
    }

    public void setNoticeAddUser(String noticeAddUser) {
        this.noticeAddUser = noticeAddUser;
    }

    @Basic
    @Column(name = "noticeAddTime")
    public Timestamp getNoticeAddTime() {
        return noticeAddTime;
    }

    public void setNoticeAddTime(Timestamp noticeAddTime) {
        this.noticeAddTime = noticeAddTime;
    }

    @Basic
    @Column(name = "showState")
    public Integer getShowState() {
        return showState;
    }

    public void setShowState(Integer showState) {
        this.showState = showState;
    }


    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Notice notice = (Notice) o;

        if (noticeId != notice.noticeId) return false;
        if (noticeTitle != null ? !noticeTitle.equals(notice.noticeTitle) : notice.noticeTitle != null) return false;
        if (noticeContent != null ? !noticeContent.equals(notice.noticeContent) : notice.noticeContent != null)
            return false;
        if (noticeOverdueTime != null ? !noticeOverdueTime.equals(notice.noticeOverdueTime) : notice.noticeOverdueTime != null)
            return false;
        if (noticeAddUser != null ? !noticeAddUser.equals(notice.noticeAddUser) : notice.noticeAddUser != null)
            return false;
        if (noticeAddTime != null ? !noticeAddTime.equals(notice.noticeAddTime) : notice.noticeAddTime != null)
            return false;
        if (showState != null ? !showState.equals(notice.showState) : notice.showState != null) return false;

        return true;
    }


    public int hashCode() {
        int result = noticeId;
        result = 31 * result + (noticeTitle != null ? noticeTitle.hashCode() : 0);
        result = 31 * result + (noticeContent != null ? noticeContent.hashCode() : 0);
        result = 31 * result + (noticeOverdueTime != null ? noticeOverdueTime.hashCode() : 0);
        result = 31 * result + (noticeAddUser != null ? noticeAddUser.hashCode() : 0);
        result = 31 * result + (noticeAddTime != null ? noticeAddTime.hashCode() : 0);
        result = 31 * result + (showState != null ? showState.hashCode() : 0);
        return result;
    }
}
